package gui;

import java.awt.Component;
import java.awt.Dimension;

import javax.swing.JList;
import javax.swing.JScrollPane;
import javax.swing.JTree;

import org.jhotdraw.contrib.SplitPaneDesktop;
import org.jhotdraw.framework.DrawingView;

public class PhotoViewerDesktop extends SplitPaneDesktop {
	
	
	public PhotoViewerDesktop () {
		super.setOneTouchExpandable(false);
		super.setDividerSize(6);
		super.setResizeWeight(.2);
	}
	
	@Override
	protected Component createRightComponent(DrawingView dv) {														//maybe pass in some sort of replacement for drawing view, like file viewer and photo viewer
		/*
		JScrollPane sp = new JScrollPane((Component)dv);
		sp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
		sp.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
		sp.setAlignmentX(LEFT_ALIGNMENT);
		return sp;
		*/
		JScrollPane scrollpane = new JScrollPane(new JList());																		//or maybe putting things in the JList could work?
		scrollpane.setMinimumSize(new Dimension(5000,300));
		scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
		return scrollpane;
	}

	@Override
	protected Component createLeftComponent(DrawingView dv) {																	
		JScrollPane scrollpane = new JScrollPane(new JTree());
		scrollpane.setMinimumSize(new Dimension(5000,150));
		//scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
		
		return scrollpane;
	}
	
	
	
	
	

}
